package com.goktech.olala.server.dao.order;

import com.goktech.olala.core.resp.RespShopCartVo;
import com.goktech.olala.server.pojo.order.ShopCart;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ShopCartMapper {
    int deleteByPrimaryKey(Integer shopCartId);

    int insert(ShopCart record);

    ShopCart selectByPrimaryKey(Integer shopCartId);

    List<ShopCart> selectAll();

    int updateByGoodsId(ShopCart record);

    List<ShopCart> selectByCustomerId(String customerId);


    //查询购物车
    List<RespShopCartVo> shopcartInfo(String customerId);

    //查询商品是否在购物车已存在
    ShopCart selectByGoodsId(@Param("goodsId") String goodsId,@Param("customerId") String customerId);

    //添加购物车
    int addShopCart(ShopCart shopCart);

}